package cn.tedu_two;

public class Test5 {
    public static void main(String[] args) {
        B b=new B();
        Thread t=new Thread(b);
        Thread t1=new Thread(b);
        Thread t2=new Thread(b);
        Thread t3=new Thread(b);
        t.start();
        t1.start();
        t2.start();
        t3.start();

    }
}
class B implements Runnable{
    int a=100;
    @Override
    public void run(){
        while(true){
            try {
                Thread.sleep(10);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            if(a>0){
                System.out.println(Thread.currentThread().getName()+"~~~"+a);
            }else{
                break;
            }
            a--;
        }
    }
}
